#define _CRT_SECURE_NO_WARNINGS

#include "Stack.h"


void test()
{
	Stack st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	StackPush(&st, 5);
	StackDestroy(&st);
}

void test1()
{
	Stack st;
	StackInit(&st); 
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	STDateType date =  StackTop(&st);
	printf("%d ", date);
	StackPop(&st);
}

void test2()
{
	Stack st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	StackPush(&st, 5);
	STDateType date = StackTop(&st);
	printf("%d\n ", date);
	
	while (!StackEmpty(&st))
	{
		printf("%d ", StackTop(&st));
		StackPop(&st);
	}
	printf("\n");
	StackDestroy(&st);
}

#include "Queue.h"

void test3()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	
	while (!QueueEmpty(&q))
	{
		printf("%d ", QueueFront(&q));

		//printf("%d ", QueueBack(&q));
		QueuePop(&q);
	}
	printf("\n");
	QueuePush(&q, 10);
	QueuePush(&q, 20);
	while (!QueueEmpty(&q))
	{
		printf("%d ", QueueFront(&q));

		//printf("%d ", QueueBack(&q));
		QueuePop(&q);
	}
	//QueueDestroy(&q);
}

void test4()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	printf("%d ", QueueSize(&q));
	QueueDestroy(&q);
}

int main()
{
	//test();
	//test1();
	//test3();
	test4();
	return 0;
}